<!DOCTYPE html>
<html>
	<head>
<meta charset="utf-8">
<title>添加设备信息</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/res/layui/css/layui.css"  media="all">
<link rel="stylesheet" href="/res/zTree_v3/css/metroStyle/metroStyle.css" type="text/css"/>
<link rel="stylesheet" href="/res/js/common/Viewer/viewer.min.css" />
<link rel="stylesheet" href="/res/js/common/videJS/video-js.min.css" />
<link rel="stylesheet" href="/res/css/style.css" media="all">
<style>
	.layui-table {
		width:600px!important;;
	}
	/* 加载的表格样式---提高优先级 */
	
	.layui-form-label {
		width: 140px
	}
	#container{
        height: 600px;
        width:100%;
    } 
    ul.ztree {
		margin-top: 10px;
		border: 1px solid #617775;
		background: #f0f6e4;
		width: 220px;
		height: 360px;
		overflow-y: scroll;
		overflow-x: auto;
	}
</style>
<body>
<div class="layui-fluid" style="padding-top:10px;">
<span class="layui-breadcrumb">
  <a><cite>首页</cite></a>
  <a><cite id="Title">添加设备信息</cite></a>
</span>
<div class="layui-clear"></div>
<form id="form_edit" class="layui-form" style="margin-top:30px;" action="">
	<input type="hidden" id="id" name="id" />
	<input type="hidden" id="createTime" name="createTime" />	
	<div class="layui-form-item">
		<label class="layui-form-label"><span style="color:red;">*</span>设备名称</label>
		<div class="layui-input-inline">
			<input type="text" id="name" name="name" class="layui-input" lay-verify="fname">
		</div>
		<label class="layui-form-label"><span style="color:red;">*</span>设备编码</label>
		<div class="layui-input-inline">
			<input type="text" id="code" name="code" class="layui-input" lay-verify="fcode">
		</div>
	</div>
	<div class="layui-form-item">      	   
	    <label class="layui-form-label">设备图片</label>
	    <div class="layui-input-inline" style="width:150px">
	        <a href="javascript:;" onclick="Viewerfun('viewer_icon')">
	           <div id="viewer_icon" >
				   <img data-original="/res/images/up.png" src="/res/images/up.png"  alt="图片"  style="width:40px;height:40px" />
			   </div>
	        </a>
	        <input type="hidden" id="icon" name="image"  class="layui-input">
	        <input type="file" id="addicon" style="width: 75px; position: absolute; right: 0px;top: 5px;" autocomplete="off" />
	    </div>
	</div>
	<div class="layui-form-item">	
		<label class="layui-form-label"><span style="color:red;">*</span>所属变电站</label>
		<div class="layui-input-inline">
		        <input type="text" id="stationName" placeholder="选择所属变电站名称"  autocomplete="off" class="layui-input">
				<input type="hidden" id="station" name="station" autocomplete="off" class="layui-input" lay-verify="fstation" lay-filter="fstation">
		</div>
	</div>
	<!-- 
	<div class="layui-form-item">      	
	    <label class="layui-form-label">二维码</label>
	    <div class="layui-input-inline">
	      <input type="text" name="qrcode"  id="qrcode" lay-verify="fqrcode"   placeholder="" autocomplete="off" class="layui-input" />
	    </div>		    
	</div>
	 -->
	<div class="layui-form-item">      	   	    
		<label class="layui-form-label"><span style="color:red;">*</span>设备类型</label>
	    <div class="layui-input-inline">
		      <input type="hidden" name="type" id="pid" lay-verify="ftype" lay-filter="ftype"/>
		      <input type="text" lay-verify="fpid"  name="pName" id="pname" placeholder="点击选择" autocomplete="off" class="layui-input" onclick="showMenu(); return false;" readonly="readonly" />
		</div>
	    <label class="layui-form-label"><span style="color:red;">*</span>电压等级</label>
       	<div class="layui-input-inline">				    	
		    <select name="grade" id="grade" placeholder="选择电压等级" lay-verify="fgrade" lay-filter="fgrade" selectTypeMain="equipment_grade" >
		        <option value="">请选择状态</option>	
		    </select>    						   
	    </div>
	</div>
	<div class="layui-form-item">	
	    <label class="layui-form-label"><span style="color:red;">*</span>设备状态</label>
       	<div class="layui-input-inline">				    	
		    <select name="state" id="state" placeholder="状态" lay-verify="fstate" lay-filter="fstate" selectTypeMain="equipment_state" >
		     <!--  <option value="">请选择状态</option>	 --> 
		    </select>    						   
	    </div>
		<label class="layui-form-label"><span style="color:red;">*</span>规格型号</label>
		<div class="layui-input-inline">
			<input type="text" id="model" name="model" class="layui-input" lay-verify="fmodel">
		</div>
   	</div>
	<div class="layui-form-item">		
		<label class="layui-form-label">nfc编码</label>
		<div class="layui-input-inline">
			<input type="text" id="nfc" name="nfc" class="layui-input" lay-verify="fnfc">
		</div>	
		<label class="layui-form-label"><span style="color:red;">*</span>生产厂家</label>
		<div class="layui-input-inline">
			<select name="supplierId" id="supplierId" placeholder="" lay-verify="fsupplierId" lay-filter="fsupplierId">
		      <option value="">请选择生产厂家</option>	 
		    </select> 
		</div>
	</div>
	<div class="layui-form-item">	
		<label class="layui-form-label">生产时间</label>
		<div class="layui-input-inline">
			<input type="text" id="startTime" name="productionTime" placeholder="" autocomplete="off" class="layui-input" lay-verify="fproductionTime" lay-key="1">
			<i class="layui-icon layui-date">&#xe637;</i>
		</div>
		<label class="layui-form-label">投产时间</label>
		<div class="layui-input-inline">
			<input type="text" id="endTime" name="putTime" placeholder="" autocomplete="off" class="layui-input"lay-key="2">
			<i class="layui-icon layui-date">&#xe637;</i>
		</div>
	</div>
	
	<div class="layui-form-item" id="imgp1">
	    <label class="layui-form-label">上传附件</label>	
		<div class="layui-upload" style="text-align: left;">
		  <button type="button" class="layui-btn layui-btn-normal" id="testList">选择附件</button> 
		  <div class="layui-upload-list up-img"  style="margin-left:170px">
		    <table class="layui-table">
		      <thead>
		        <tr>
		          <th>文件名</th>
		          <th>操作</th>
		        </tr>
		       </thead>
		      <tbody id="demoList"></tbody>
		    </table>
		  </div>
		</div>
	</div>
	<div class="layui-form-item">
		<label  class="layui-form-label">设备位置</label>
		<div class="layui-input-inline" style="width:530px;">
		   <textarea id="position" name="position" rows="5" lay-verify="fposition" maxlength="100" class="layui-textarea"></textarea>
		</div>
	</div>
	<div class="layui-form-item">
	    <label class="layui-form-label"><span style="color:red;">*</span>保养周期</label>
		<div class="layui-input-inline">
             <select id="cycle"  name="cycle" lay-verify="fcycle" lay-filter="typeFilter" selectTypeMain="equipment_cycle" >
			  <option value="0">选择保养周期</option>
		  </select>		   
		</div>
		<div class="layui-input-inline MaintainDate" style="color:red;width:380px;height:38px;line-height:38px"></div>
	</div>	
	<div class="layui-form-item">
		<label  class="layui-form-label">备注</label>
		<div class="layui-input-inline" style="width:530px;">
		   <textarea id="remarks" name="remarks" rows="5" lay-verify="fremarks" placeholder="填写备注......" class="layui-textarea"></textarea>
		</div>
	</div>	
				
	<div class="layui-form-item" style="margin-top:30px">
	    <div class="layui-input-block">
	      <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">提交</button>
		  <button class="layui-btn layui-btn-primary" onclick="historyBack()">返回</button>
	    </div>
	</div>
</form>
<!--所属变电站-->
<div id="form_addstation" class="layui-form" style="margin-top:30px;margin-left:30px;display:none">
		<div class="demoTable">
			<div class="layui-input-inline">				    	
			    <input type="text" name="name" id="Stationrname" defaultmsg="变电站名称" placeholder="变电站名称"  
			    class="layui-input" condition=""/>    				
		    </div>
			<div class="layui-input-inline" id="searchbutton">
	             <button class="layui-btn layui-btn-normal" lay-submit lay-filter="queryData2"><i class="layui-icon ">&#xe615</i></button>      		
	        </div>
	        <div class="layui-input-inline" style="margin-left:8%">
	              <button class="layui-btn layui-btn-normal" data-type="form_addownerform" >确定添加</button>      		
	        </div>
	        <div class="layui-tab-item layui-show" >
	    		<table class="layui-hide" id="stationData" lay-filter="stationDataTest"></table>
	    	</div>	
		</div>																																							
</div>
<div id="menuContent" class="menuContent" style="display:none; position: absolute;">
  <ul id="treeDemo" class="ztree" style="margin-top:0; width:160px;">
  </ul>
</div>
</body>
<script src="/res/js/common/jquery-3.2.1.min.js"></script>
<script src="/res/js/common/app.js"></script>
<script type="text/javascript" src="/res/zTree_v3/js/jquery.ztree.core.js"></script>
<script src="/res/js/common/Viewer/viewer.min.js"></script>
<script src="/res/js/common/videJS/video.min.js"></script>	
<script src="/res/js/validate.js"></script>
<script src="/res/layui/layui.js"></script>
<script type="text/javascript" src="/res/js/equipment/AddEquipment.js" ></script>
<script type="text/javascript" src="/res/js/equipment/equipment_form.js" ></script>
</html>